<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>聊天室登录</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" type="text/css" th:href="@{/layui/css/layui.css}">
    <script type="text/javascript" th:src="@{/layui/layui.js}"></script>
    <!--semantic-ui-->
    <link th:href="@{/css/semantic.min.css}" rel="stylesheet"></link>
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
    <style>
        body{
            background-image: url("/images/stulogin.jpg");
            height: 100%;
            width: 100%;
            background-size: cover;
            position: absolute;
            overflow: hidden;
        }
    </style>
</head>
<body>


<ul class="layui-fixbar">
    <li class="layui-icon layui-icon-username" id="gotoadmin"></li>
</ul>

<!--登录界面-->
<div class="ui  container">
    <div class="ui segment">

        <h1 class="ui blue dividing header">登录&nbsp;&nbsp;&nbsp;&nbsp;[[${msg}]]</h1>

        <form class="layui-form" method="post" th:action="@{/chat_submit}">
            <div class="layui-form-item">
                <label class="layui-form-label">名字</label>
                <div class="layui-input-inline">
                    <input type="text" name="name" required  lay-verify="required" placeholder="请输入你的名字" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button type="submit" class="layui-btn" lay-submit lay-filter="formDemo">登录</button>
                </div>
            </div>

        </form>
    </div>
</div>
<!--登录界面-->

<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;

        //监听提交
        // form.on('submit(formDemo)', function(data){
        //     layer.msg(JSON.stringify(data.field));
        //     return false;
        // });
    });
</script>
</body>
</html>